package com.geeguo.ebuilder.operation.business.system.organization.model;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
public class OrgTreeNodeVO {
	
	@Schema(title = "主键")
	private String id;
	@Schema(title = "名称")
	private String name;
	
	@Schema(title = "子节点")
	private List<OrgTreeNodeVO> children;
	
	public void addChild(OrgTreeNodeVO child) {
		if (children == null) {
			children = new ArrayList<OrgTreeNodeVO>();
		}
		children.add(child);
	}
}
